Skip to content

Conversation

@jjanie00
Copy link
Contributor

🔗 이슈 번호

Closes #211


📋 작업 사항

  • 카카오 로그인 버튼 클릭 시 카카오 인증 동의창으로 리디렉션 처리
  • 인가 코드 (code, state) 수신 후, postOAuth API 호출하여 로그인 처리
  • 서버 액션 기반 쿠키 토큰 설정으로 보안성 강화
  • remotePatterns 카카오 이미지 도메인 등록 (프로필 이미지 대응)
  • CookieSetter 컴포넌트 리팩토링 및 `searchParams 처리 방식 개선
  • 기존 api 와의 호환성을 위해 secure, httpOnly 옵션 조정

📷 스크린샷


📢 공유 사항

  • Vercel 배포 시 카카오 로그인 정상 동작을 위해 환경 변수 등록이 필요합니다
    • NEXT_PUBLIC_KAKAO_REST_API_KEY : 카카오 로그인 클라이언트 키
    • NEXT_PUBLIC_KAKAO_REDIRECT_URI : 로그인 성공 후 리디렉션 되는 URI (배포용 URI)
  • Kakao Developers 에서 리디렉션 UI 는 변경된 상태입니다.

📚 참고 자료

@jjanie00 jjanie00 requested review from ARON-Y and hyeonjiroh May 24, 2025 06:11
@jjanie00 jjanie00 linked an issue May 24, 2025 that may be closed by this pull request
3 tasks
Copy link
Contributor

@ARON-Y ARON-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아까 코드 보면서 설명해주셨지만 CSRF 공격 방지를 위한 state를 사용한 점이 좋네여 고생하셨습니다 해명님!

// httpOnly: true,
sameSite: 'strict',
});
console.log('로그인 성공:', data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 토스트 알림으로 바꿔주는건 어떨까요?

@FE13-Part4-Team2 FE13-Part4-Team2 deleted a comment from github-actions bot May 24, 2025
@FE13-Part4-Team2 FE13-Part4-Team2 deleted a comment from github-actions bot May 24, 2025
@github-actions
Copy link

Preview Deployment
🔗 https://coworkers-50brbhafo-hyeonjirohs-projects.vercel.app

Copy link
Contributor

@hyeonjiroh hyeonjiroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!

@hyeonjiroh hyeonjiroh merged commit 57aab2a into dev May 24, 2025
4 checks passed
@hyeonjiroh hyeonjiroh deleted the feat/#211/ouath branch May 24, 2025 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Oauth

4 participants